﻿using NewLife.Http;
using Nito.AsyncEx;
using System.Threading.Tasks;

namespace ZYing.QPanel.Http
{
    public abstract class AsyncHttpHandler : IHttpHandler
    {
        public virtual void ProcessRequest(IHttpContext context) => AsyncContext.Run(() => ProcessRequestAsync(context));
        protected abstract Task ProcessRequestAsync(IHttpContext context);
    }
}
